#if !defined(X_MACROS_BODY)
#error Please define X_MACROS_BODY
#elif !defined(X_MACROS_NAME)
#error Please define X_MACROS_NAME
#else

/*
 * http://stackoverflow.com/questions/264269/what-is-a-good-reference-documenting-patterns-of-use-of-x-macros-in-c-or-possib
 * Macros usage detail http://gcc.gnu.org/onlinedocs/cpp/Macros.html
 */

#define X_MERGE(a, b) MERGE(a, b)
#define MERGE(a, b) a##b
x_macro_info_t X_MERGE(X_MACROS_NAME, _INFO)[] =
{
#define X(Enum,Val,Text)     {#Enum, Val, Text},
	X_MACROS_BODY
#undef X
	{NULL, 0, NULL}
};
#undef MERGE
#undef X_MERGE

#undef X_MACROS_NAME
#undef X_MACROS_BODY
#endif
